#include <algorithm>
#include <cmath>
#include <cstdio>

const int N = 205, M = 1 << 8, LEN = N + 10;
int n, x;
double p, f[N][M][2][LEN];

inline int getend(int x) {
  int res = 0;
  while (!((x >> res) & 1)) { ++res; }
  return res;
}

int main() {
#ifndef ONLINE_JUDGE
#ifdef LOCAL
  freopen("testdata.in", "r", stdin);
  freopen("testdata.out", "w", stdout);
#else
  freopen("exp.in", "r", stdin);
  freopen("exp.out", "w", stdout);
#endif
#endif

  scanf("%d%d%lf", &x, &n, &p);
  p *= 0.01;
  int cnt = 0, tmp = x >> 8;
  bool bit = tmp & 1;
  while (tmp && (((tmp >> cnt) & 1) == bit)) ++cnt;
  f[0][x & 255][bit][cnt] = 1;

  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < M; ++j) {
      for (int k = 0; k < LEN; ++k) {
        for (int h = 0; h < 2; ++h) {
          bool bit = (j >> 7) & 1;
          int cnt = bit == h ? k + 1 : 1;

          f[i + 1][(j << 1) & 255][bit][cnt] += f[i][j][h][k] * p;
          bit = j == 255;
          cnt = (!bit == h) ? k + 1 : 1;
          f[i + 1][(j + 1) & 255][!bit][cnt] += f[i][j][h][k] * (1 - p);
        }
      }
    }
  }
  double ans = 0;
  for (int i = 0; i < M; ++i) {
    for (int j = 0; j < LEN; ++j) {
      for (int k = 0; k < 2; ++k)
        ans += f[n][i][k][j] * (i ? getend(i) : 8 + (k ? 0 : j));
    }
  }
  printf("%.13lf", ans);
  return 0;
}